import apibase from "@/api/apiBase";
import axios from "axios";
import { menuListInterface } from "./userCenter.interface";

//获取菜单列表
export const $menuList = (params:menuListInterface) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url:'/travel/menu/list',
    data:params,
    instance,
  })
}
//获取用户订单
export const $userOrderList = (params:any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url:'/travel/api/user_order/list',
    data:params,
    instance,
  })
}

//获取用户订单详情
export const $userOrderDetail= (params:any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url:'/travel/api/user_order/detail',
    data:params,
    instance,
  })
}

//获取保单人员列表
export const $userOrderPeopleList = (params:any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url:'/travel/api/user_order/peopleList',
    data:params,
    instance,
  })
}
//下载电子保单
export const $getPolicyFile = (params:any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url:'/travel/api/user_order/getPolicyFile',
    data:params,
    instance,
  })
}
//取消订单
export const $userOrderCancel = (params:any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url:'travel/api/user_order/cancel',
    data:params,
    instance,
  })
}